import { DtoValidation } from '@/modules/core/decorators/dto-validation.decorator';
import { Injectable } from '@nestjs/common';
import { IsNotEmpty, IsOptional, IsString, MaxLength } from 'class-validator';

@Injectable()
@DtoValidation({ type: 'body' })
export class CreateGoodCategoryDto {
  @IsString()
  @MaxLength(256, {
    message: '物品名称不能超过256个字符',
  })
  @IsNotEmpty({ message: '物品名称不能为空' })
  name!: string;
}
